package com.ququ.syb.mqhandler.service;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ququ.common.result.Result;
import com.ququ.syb.common.pojo.WithdrawOrder;
import com.ququ.syb.mqhandler.fegin.WithdrawBusinessFegin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class WithdrawOrderCallbackService {
    @Autowired
    private WithdrawBusinessFegin withdrawBusinessFegin;

    public void withdrawOrderCallback(String message){
        JSONObject jsonObject = JSON.parseObject(message);
        Result<WithdrawOrder> result = withdrawBusinessFegin.withdrawCallback(jsonObject.getString("tradenum"),
                jsonObject.getInteger("status"),
                jsonObject.getString("failreason"));
    }

}
